import { createRouter,createWebHistory } from "vue-router";
import manager from "@/manager/manager.vue";
import register from "@/Register/register.vue";
import medicine from "@/manager/management/medicine.vue";
import project from "@/manager/management/project.vue";
import login from "@/Login/login.vue";
import staff from "@/manager/management/staff.vue";
import Myapp from "@/manager/management/myapp.vue";
import Doc from "@/manager/management/doc.vue";
import Med from "@/manager/management/med.vue";
import Mymed from "@/manager/management/mymed.vue";
const router = createRouter({
    history:createWebHistory(),
        routes:[
            {
                path:'/manager',
                component:manager,
                children:[
                    {
                   
                    path:'staff',
                    component:staff
                    },
                    {
                   
                        path:'medicine',
                        component:medicine
                        },
                        {
                   
                            path:'project',
                            component:project
                            },
                            {
                       
                                path:'myapp',
                                component:Myapp
                                },
                                {
                           
                                    path:'doc',
                                    component:Doc
                                    },
                                    {
                               
                                        path:'med',
                                        component:Med
                                        },
                                        {
                                   
                                            path:'mymed',
                                            component:Mymed
                                            }
                    ]
                },
            {
                path:'/login',
                component:login
                },
             {
                 path:'/register',
                 component:register
                 },
             {
                path:'/',
                redirect:'/login'
             } ,  
        ]
    })
    export default router